package com.ten.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ten.mapper.UserMapper;
import com.ten.pojo.User;
import com.ten.service.UserService;
@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;
	@Override
	public User login(String name, String password) {
		User u =userMapper.getByName(name);
			if(u!=null&&u.getPassword().equals(password)){
				return u;
			}else {
				return null;
			}
		}
	}

